<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>

<script type="text/javascript">
	function knowledgeCategoryTree_onNodeClick(event, treeId, treeNode) {

		knowledgeItemGrid.search({
			"field" : "treenode_path",
			"op" : "bw",
			"data" : treeNode.treenodePath
		});
	}
</script>
<div class="box no-border">

	<div class="box-left">
		<isperp:tree id="knowledgeCategoryTree">
			<isperp:async enable="true" url="knowledge2/knowledgeCategory2/getTree">
			</isperp:async>
			<isperp:callback onClick="knowledgeCategoryTree_onNodeClick">
			</isperp:callback>
		</isperp:tree>
	</div>
	<div class="box-right">
		<isperp:grid url="knowledge2/knowledgeItem2/manageList"
			gridId="knowledgeItemGrid" gridTitle="${pageTitle}"
			cusViewUrl="knowledge2/knowledgeSearch2/knowledgeInfoView"
			cusFormatterActions="true" cusEditUrl="knowledge2/knowledgeItem2/edit"
			ondbClickRowEvent="knowledgeItemGrid.edit(rowid);"
			cusDeleteUrl="knowledge2/knowledgeItem2/delete"
			excelExportUrl="knowledge2/knowledgeItem2/excelExport">
			<jsp:attribute name="toolbar">
			<button
					onclick="$.get('knowledge2/knowledgeItem2/rebuildIndex',function(){isperp.tooltip('重建成功')});">重建索引</button>
			</jsp:attribute>
			<jsp:attribute name="searchbar">
				<table class="search-table">
					<tbody>
						<tr>
							<td align="right">标题：</td>
							<td><input type="text" field="title" op="cn">
							</td>
							<td align="right">关键字：</td>
							<td><input type="text" field="keyword" op="cn">
							</td>
						</tr>
						<tr>
							<td align="right">发布时间：</td>
							<td><input id="publishDateStart" type="date"
								field="publish_date" op="gt" style="width: 68px" />~<input
								id="publishDateEnd" type="date" field="publish_date" op="lt"
								style="width: 68px" />
							</td>
							<td align="right">创建人：</td>
							<td><input type="text" field="creator_name" op="cn">
							</td>
						</tr>
					</tbody>
				</table>
			</jsp:attribute>
			<jsp:body>
				<isperp:column name="id" title="id" hidden="true"></isperp:column>	
				<isperp:column name="title" title="标题" width="120">
				</isperp:column>
				<isperp:column name="keyword" title="关键字" width="80">
				</isperp:column>
				<isperp:column name="status" title="状态" width="30">
				</isperp:column>
				<isperp:column name="creator_name" title="创建人" width="60">
				</isperp:column>
				<isperp:column name="publish_date" title="发布时间" width="80">
		 		</isperp:column>
				
				<isperp:column name="read_times" title="浏览数" width="30">
				</isperp:column>
				<isperp:column name="commentary_times" title="评论数" width="30">
				</isperp:column>
				
				
			</jsp:body>

		</isperp:grid>
		 
	</div>

</div>
